package com.guomei.bean.curse;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Data
public class AddOrUpdateCourseChapter {    /**
     * 章节ID
     */
    private Long id;

    /**
     * 课程ID
     */
    @NotNull(message = "课程ID不能为空")
    private Long courseId;

    /**
     * 章节名称
     */
    @NotNull(message = "章节名称不能为空")
    @NotBlank(message = "章节名称不能为空")
    private String chapterName;

    /**
     * 章节描述
     */
    @NotNull(message = "章节描述不能为空")
    @NotBlank(message = "章节描述不能为空")
    private String description;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空")
    private Integer sortOrder;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatedTime;

}
